package com.reader.cms.mapper.sys;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.reader.cms.entity.sys.SysMenu;
import com.reader.cms.entity.sys.SysUser;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jiahaikun
 * @since 2018-06-29
 */
public interface SysMenuMapper extends BaseMapper<SysMenu> {
    List<SysMenu> getMenuChild(long parentID);
    List<SysMenu> getUserMenus(SysUser sysUser);
    List<SysMenu> getAllMenus(); //超级管理员查所有
    List<String>  getMenuRole(Integer menuID);
    List<SysMenu> getAllMenusManagement();//菜单管理
    List<Map<String, Object>> selectListPage(Pagination page, @Param("parentId") Integer parentId, @Param("name") String name);

    List<SysMenu> getAllResources();

    List<Integer> getRoleMenu(@Param("id")Integer id);


}
